/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.service.impl;

import com.persistencia.dao.SalonDao;
import com.persistencia.dao.impl.SalonDaoImpl;
import com.persistencia.domain.Salon;
import com.service.SalonService;
import java.io.Serializable;
import java.util.List;

/**
 *
 * @author SHERLY
 */
public class SalonServiceImpl implements SalonService, Serializable{

    private SalonDao salonDao = new SalonDaoImpl();

    public void setSalonDao(SalonDao salonDao) {
        this.salonDao = salonDao;
    }
    
    @Override
    public void registrarSalon(Salon salon) throws Exception {
        salonDao.registrar(salon);
    }

    @Override
    public void actualizarSalon(Salon salon) throws Exception {
        salonDao.actualizar(salon);
    }

    @Override
    public void eliminarSalon(Object id) throws Exception {
        salonDao.eliminar(id);
    }

    @Override
    public Salon obtenerSalonPorId(Object id) throws Exception {
        return salonDao.obtenerPorId(id);
    }

    @Override
    public List<Salon> obtenerListaSalon() throws Exception {
        return salonDao.obtenerLista();
    }

    @Override
    public int salonMaxId() {
        return salonDao.salonMaxId();
    }    
    
}
